﻿
namespace com.wei8808.utility
{
    /// <summary>
    /// session存储用户登录信息
    /// </summary>
    public class SysContext
    {
        /// <summary>
        /// 用户账户，（角色下面自己写需要的）
        /// </summary>
        public static string CurrentLoginCode
        {
            get
            {
                try
                {
                    var ctx = System.Web.HttpContext.Current;
                    var value = ctx.Session["CurrentLoginCode"];
                    return value.ToString();
                }
                catch
                {
                    return "";
                }
            }
            set
            {
                var ctx = System.Web.HttpContext.Current;
                ctx.Session["CurrentLoginCode"] = value;
            }
        }
    }
}
